﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameMain : MonoBehaviour
{
    public static string id = "";

    private void Start()
    {
        NetManager.AddEventListener(NetManager.NetEvent.Close,OnConnectClose);
        NetManager.AddMsgListener("MsgKick",OnMsgKick);
        
        PanelManager.Init();
        BattleManager.Init();
        PanelManager.Open<LoginPanel>();
    }

    private void Update()
    {
        NetManager.Update();
    }

    void OnConnectClose(string err)
    {
        Debug.Log("断开连接");
    }

    void OnMsgKick(MsgBase msgBase)
    {
        PanelManager.Open<TipPanel>();
    }
}
